package com.mediatek.settings.ext;

import com.android.mtksettingslib.wifi.AccessPoint;
import com.android.wifitrackerlib.WifiPickerTracker;

import android.content.ContentResolver;
import android.net.NetworkInfo.DetailedState;
import android.net.wifi.WifiConfiguration;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import androidx.preference.PreferenceCategory;

import android.util.Log;
import android.view.ContextMenu;
import android.view.Menu;
import android.view.MenuItem;

/* Dummy implmentation , do nothing */
public class DefaultWifiSettingsExt implements IWifiSettingsExt {
    private static final String TAG = "DefaultWifiSettingsExt";

    public void updateContextMenu(ContextMenu menu, int menuId,
            Preference preference) {
    }

    public void emptyCategory(PreferenceScreen screen) {
    }

    public boolean disconnect(MenuItem item, WifiConfiguration wifiConfig) {
        return false;
    }

    public void addPreference(PreferenceScreen screen,
            PreferenceCategory preferenceCategory, Preference preference,
            boolean isConfiged) {
        if (preferenceCategory != null) {
            preferenceCategory.addPreference(preference);
        }
    }

    public void init(PreferenceScreen screen) {
    }

    public void init(PreferenceScreen screen, Object objectWifiSettings2){
    }

    public boolean removeConnectedAccessPointPreference() {
        return false;
    }

    @Override
    public void addRefreshPreference(PreferenceScreen screen,
            Object wifiTracker,
            boolean isUiRestricted) {
    }

    @Override
    public boolean customRefreshButtonClick(Preference preference) {
        return false;
    }

    @Override
    public boolean customRefreshButtonClick(Preference preference, boolean isWifiSettings2) {
        return false;
    }

    @Override
    public void customRefreshButtonStatus(boolean checkStatus) {
    }

    @Override
    public boolean addModifyMenu(boolean isSaved) {
        Log.i(TAG, "addModifyMenu return false");
        return false;
    }

    @Override
    public void customeAddOpWifiUI(PreferenceScreen preferenceScreen,
            WifiPickerTracker wifiPickerTracker,
            PreferenceCategory connectWifiPreferenceCategory,
            PreferenceCategory wifiPreferenceCategory,
            Preference preference){
    }

    @Override
    public void customeAddWifiNetworkPreference(PreferenceCategory wifiPreferenceCategory,
            Preference preference) {
        Log.i(TAG, "customeAddWifiNetworkPreference");
        wifiPreferenceCategory.addPreference(preference);
    }

    @Override
    public void customeAddWifiNetworkPreferenceOrder(Preference preference, int index){
        Log.i(TAG, "customeAddWifiNetworkPreferenceOrder");
        preference.setOrder(index++);
    }

    @Override
    public void addRefreshPreference(PreferenceScreen screen,
            boolean isWifiStateEnable,
            boolean isUiRestricted){
        Log.i(TAG, "addRefreshPreference do nothing");
    }

    public boolean customeMenu(boolean isDisconnect){
        Log.i(TAG, "addRefreshPreference do nothing");
        return false;
    }
}
